#include <QtCore/QCoreApplication>
#include "myChatServer.h"
#include "connection.h"
#include "user.h"

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    MyChatServer  chatServer;
    Connection database;
    database.connectToDatabase();

    /*
    User *aUser;
    int *buddyArray;
    buddyArray = aUser->retrieveBuddies("sehar");
    int arraySize = buddyArray[0];
    qDebug() << "b[0]: " <<  buddyArray[0];

    for(int i = 1; i <= arraySize; i++)
    {
        qDebug() << "Index: " << buddyArray[i];
    }
*/
/*
    User *aUser;
    QVector <QString> testBuddies;
    QVector <QString> testStatus;
    testBuddies = aUser->retrieveBuddies("sehar");
    for(int i = 0; i< testBuddies.size(); i++)
        qDebug() << "My buddies: " << testBuddies.at(i);

    testStatus = aUser->retrieveStatus(testBuddies);
    for(int j = 0; j < testBuddies.size(); j++)
        qDebug() << "Their status: " << testStatus.at(j);
*/
    return a.exec();
}
